package com.vframework.cms.document.service;

import java.util.List;
import java.util.Map;

import com.vframework.base.exception.BaseException;
import com.vframework.base.service.BaseService;
import com.vframework.cms.document.model.DocumentBean;

public interface DocumentService extends BaseService {
    
    public Integer getCount(Map<String, Object> paramMap) throws BaseException;
    
    public List<DocumentBean> getList(Map<String, Object> paramMap) throws BaseException;

    /**
     * @param parentId
     * @return
     * @throws BaseException
     * @author zt_shan
     * @description 获取所有父级信息，直到parentId == 0
     */
    public List<DocumentBean> getParents(String parentId) throws BaseException;

    /**
     * @param path
     * @return
     * @throws BaseException
     * @author zt_shan
     * @description 根据path取父级对象，如果没有，会新建并返回
     */
    public DocumentBean getParentByPath(String path) throws BaseException;

    /**
     * @param fileId
     * @return
     * @throws BaseException
     * @author zt_shan
     * @description 根据id获取对象信息，出于安全考虑，程序内部接口可以使用id查询   提供给外部接口使用getByUId方法
     */
    public DocumentBean getById(String fileId) throws BaseException;

    /**
     * @param fileId
     * @return
     * @throws BaseException
     * @author zt_shan
     * @description 根据id获取对象信息
     */
    public DocumentBean getByUId(String uid) throws BaseException;
    
    public Integer insert(DocumentBean documentBean) throws BaseException;

    public Integer update(DocumentBean documentBean) throws BaseException;

    public Integer delete(Map<String, Object> paramMap) throws BaseException;
}
